home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: alpet@airmail.net (Adam Peterson)
- Newsgroups: comp.lang.c
- Subject: Re: How to get program using Fork() and Pipe()
- Date: Fri, 23 Feb 1996 03:52:21 GMT
- Organization: customer of Internet America
- Message-ID: <4gj6p9$o0h@news-f.iadfw.net>
- References: <4gic02$6l0@news.mty.itesm.mx>
- NNTP-Posting-Host: dal24-12.ppp.iadfw.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- al535994@academ10.mty.itesm.mx (ARTURO RAFAEL LOPEZ CASTRO) wrote:
-
- >I would like to know if someone could give program examples using fork and pipe because I have trouble using them.
-
- >Thanks.
-
- I don't have any sample code, but they shouldn't be to bad. The fork
- and pipe basically create an identical copy of the running program.
- The only way for the code to tell which one it is, is to check the
- process's PID number before and after the fork. If it hasn't changed,
- then it is the parent, otherwise it is the 2nd copy.
-
- Adam
-
-
-